package com.fh.shop.admin.controller;

import com.fh.shop.admin.common.ServerResponse;
import com.fh.shop.admin.util.RedisUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/clean")
public class CleanController {
    @PostMapping("/cache")
    public ServerResponse cache(String key){
        RedisUtil.del(key);
        return ServerResponse.success();
    }
}
